using QFramework.Framework.Extension;
using UnityEditor;
using UnityEngine;
#if UNITY_EDITOR
#endif

namespace QFramework.Example.Util._4.Transform_API_简化
{
    /**
     * Transform API 简化工具-示例
     */
    public class TransformSimplifyExample
    {
#if UNITY_EDITOR
        [MenuItem("QFramework/Example/Util/4.Transform API 简化", false, 4)]
        private static void MenuClicked()
        {
            var transform = new GameObject("transform").transform;

            transform.SetLocalPosX(5.0f);
            transform.SetLocalPosY(5.0f);
            transform.SetLocalPosZ(5.0f);
            transform.Identity();

            var childTrans = new GameObject("Child").transform;
            transform.AddChild(childTrans);
        }
#endif
    }
}